package com.jnu.myapplication.addEditfragment;

import com.jnu.myapplication.DataBase.TypeBean;
import com.jnu.myapplication.DataBase.dataManager;
import com.jnu.myapplication.R;

import java.util.List;

public class infragment extends editfragment {
int id;

    public infragment(int id) {
        this.id=id;
    }

    @Override
        public void loadDataToGV() {
            super.loadDataToGV();
            //获取数据库当中的数据源
            List<TypeBean> inlist = dataManager.getTypeList(1);
            typeList.addAll(inlist);
            adapter.notifyDataSetChanged();
            typeTv.setText("其他");
            typeIv.setImageResource(R.mipmap.user_f);
        }

        @Override
        public void updateAccounttb() {
            accountBean.setKind(1);
            dataManager.updateItemAccounttb(accountBean,id);
        }


}
